package com.pxst.fi.controller;

import java.util.Map;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.pxst.fi.service.FiService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/** 
* @author yangxy
* @version 创建时间：2023年9月6日 上午10:44:51 
*/
@Slf4j
@RestController
@Api(tags = "充值相关接口")
public class FiController {
	@Autowired
	private FiService fiService;
	
	@PostMapping("/{merchant}/SH/sendPay")
	@ApiOperation(value = "发起充值")
	public Map<String,Object> sendPay(@PathVariable("merchant") String merchant,@RequestBody @Valid String ciphertext){
		log.info("{}",merchant);
		return fiService.sendPay(merchant, ciphertext, null);
	}
}
